<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@page import="java.util.List"%>
    <%@page import="com.hongye.app.model.EvaluationModel"%>
    <%@page import="com.hongye.app.model.UserAppModel"%>
<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->

		<link href="css/bootstrap.css" rel="stylesheet">
	<link href="css/site1.css" rel="stylesheet">
		<script src="js/jquery.min.js"></script>
		<script src="js/bootstrap.min.js"></script>
		<script src="js/bootstrap.js"></script>

		<title>商品详情</title>
<style>
	.spxq-txt{ color:#222; border-bottom:s olid 6px #d43eob; display:none;}
	.spxq-txt1{ color:#222; border-bottom:s olid 6px #d43eob; }
	#myTab .select{ color:#d43e0b; border-bottom:solid 2px #d43e0b; display:black;}
	
</style>
	<bod
	</head>

	<body>
    	
    <video loop="loop" controls="controls" autoplay="autoplay" name="media" width="100%" height="100%" webkit-playsinline playsinline="true"><source src="../upload/${g['videoname'] }"   ></video>
    <div class="container">
    	<h4>${g['g_name'] }</h3>
    	 <p class="text-left"><span>¥</span>${g['real_price'] }  &nbsp;&nbsp;销量：${g['sales']} &nbsp;&nbsp;</p>
		<%List<EvaluationModel> evaluation=(List)request.getAttribute("evaluation");%>
    	<div>
				<ul id="myTab" class="nav nav-tabs">
					<li class="active"><a id="shangpin" class="spxq-txt  select" onclick="show1();" href="" data-toggle="tab">商品信息</a>
					</li>
					<li><a id="pinglun" class="spxq-txt1" onclick="show2();" href="" data-toggle="tab">评价(<%=evaluation.size() %>)</a></li>
					
				</ul>
				<div id="myTabContent" class="tab-content">
					<div class="tab-pane fade in active" >
						<p>${g['content'] }
						</p>
					</div>
				</div>
				<div class="spxq-txt"  id="ios">
					<%
						for(int i=1;i<=evaluation.size();i++){
							EvaluationModel em=evaluation.get(i-1);
						%>
							<div class="page-header" style="margin-top: 1rem !important; margin-bottom: 0px !important;">
								<h5 style="height: 30px;"><div class="col-xs-7 col-sm-7"  style="padding-left: 0px !important;"><img src='<%=em.get("avatar") %>' class="img-circle" width="30" > &nbsp;&nbsp;<hsmall><%=em.get("nick") %></small></div><div class="col-xs-5 col-sm-5" style="line-height: 2.4rem;"><%=em.get("c_time") %></div></h5>
								<p style="margin-bottom: 0px !important;"><%=em.get("evaluation") %></p>			
							</div>
					<%} %>
				</div>
				<script>
					//$(function() {
					//	$('#myTab li:eq(0) a').tab('show');
					//});
					
					function show1(){
						$("#ios").css('display','none');
						$("#myTabContent").css('display','block');
						$("#shangpin").addClass("select");
						$("#pinglun").removeClass("select");
					}
					
					function show2(){
						$("#myTabContent").css('display','none');
						$("#ios").css('display','block');
						$("#shangpin").removeClass("select");
						$("#pinglun").addClass("select");
					}
				</script>
			</div>
		</div>
    </div>
    
	</body>

</html>